@extends('admin.layout')
@section('content')
            
      <!-- BEGIN MAIN CONTENT -->
      
      
      <section id="main-content">
             
    <!-- BEGIN WRAPPER  -->
        <section class="wrapper">
                     <section class="panel">
                        <header class="panel-heading">
                           <a href="javascript:;" class="fa fa-chevron-down"></a>
                           <a href="javascript:;" class="fa fa-times"></a>
                           </span>
                        </header>

                           
                         @if (count($errors) > 0)
                           <div class="box-body">
                              <div class="alert alert-danger alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                <h4><i class="fa fa-warning"></i> 商品添加失败:</h4>
                        
                            
                                <ul>
                                    @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li>
                                    @endforeach
                                </ul>
                             </div>
                            </div><!-- /.box-body -->
                        @endif  

                        @if(session('info')) 

                            <div class="box-body">
                              <div class="alert alert-danger alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                <h4><i class="fa fa-warning"></i>数据插入失败,数据未做更改!</h4>
                            </div>
                        @endif          

                        <div class="panel-body" >
                        <label for="InputUsername">请修改商品信息:</label>
                           <form  action="/admin/goods/goodedit/doeditDetail" method="post" enctype="multipart/form-data">
                            {{ csrf_field() }}
                              <div class="form-group">
                              <input type="hidden" value="{{ $data -> id }}" name="id"/>
                              <input type="hidden" value="{{ $data -> good_id }}" name="good_id"/>
                              <input type="hidden" value="{{ $data -> good_img }}" name="img"/>

                                 <label for="InputColor">商品颜色</label>
                                 <input class="form-control" id="InputColor" type="text" name="good_color" value="{{ $data ->good_color }}" placeholder="请输入商品颜色" />
                                 <br>
                                  <label for="InputUsername">原商品图片</label>
                                 <br>
                                 <img src="{{ url('/upload/'.$data ->good_img) }}" width='100px'>
                                 <br>
                                 <label for="InputImg">上传新商品图片</label>
                                 <input id="InputImg" type="file" name="good_img">

                                 <label for="InputNet">网络制式</label>
                                 <input class="form-control" id="InputNet" placeholder="请输入网络制式" type="text" name="good_net_type" value="{{ $data ->good_net_type }}" />
                                 <label for="InputROM">机身内存</label>
                                 <input class="form-control" id="InputROM" placeholder="请输入商品内存" type="text" name="good_ROM" value="{{ $data ->good_ROM }}" />
                                 <label for="InputStore">商品库存</label>
                                 <input class="form-control" id="InputStore" placeholder="请输入商品库存" type="number" name="good_store" value="{{ $data ->good_store }}" />

                                 <label for="InputPrice">商品价格</label>
                                 <input class="form-control" id="InputPrice" placeholder="请输入商品价格" type="number" name="good_price" value="{{ $data ->good_price }}" />

                                 
                                 
                                 <br>
                                 
                              <button type="submit" class="btn btn-info">修改的商品信息</button>
                           </form>
                        </div>
                     </section>
               </section>
    <!-- END WRAPPER  -->
      </section>
      <!-- END MAIN CONTENT -->
           

@endsection